<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

// 应用行为扩展定义文件

use app\constants\common\AppHookCode;

return [
    // 应用初始化
    'app_init'                             => [],
    // 应用开始
    'app_begin'                            => [
        app\kernel\behavior\ModelBehavior::class,
    ],
    // 模块初始化
    'module_init'                          => [],
    // 操作开始执行
    'action_begin'                         => [],
    // 视图内容过滤
    'view_filter'                          => [],
    // 日志写入
    'log_write'                            => [],
    // 应用结束
    'app_end'                              => [],
    // 用户注册成功后
    AppHookCode::USER_REGISTER_AFTER       => [
        app\kernel\behavior\UserBehavior::class,
    ],
    AppHookCode::LIBRARY_REMOVE_AFTER      => [
        app\kernel\behavior\LibraryBehavior::class,
    ],
    AppHookCode::LIBRARY_DOC_MODIFY_BEFORE => [
        app\kernel\behavior\LibraryDocBehavior::class,
    ],
    AppHookCode::LIBRARY_DOC_MODIFY_AFTER  => [
        app\kernel\behavior\LibraryDocBehavior::class,
    ],
    AppHookCode::LIBRARY_DOC_CREATE_AFTER  => [
        app\kernel\behavior\LibraryDocBehavior::class,
    ],
    AppHookCode::LIBRARY_DOC_REMOVE_BEFORE  => [
        app\kernel\behavior\LibraryDocBehavior::class,
    ],
];
